fmHeight = document.documentElement.clientHeight;
divFengMian.style.height = fmHeight + "px";
function showContent(a) {
    if (window.isChuangGuan != 2) {
        a.style.height = "auto";
    }
    divFengMian.style.display = "none";
    $("html, body").scrollTop(0);
    fixBottom();
}
function replaceSrcImg(b) {
   /* var c = "http://pubimage.sojump.cn";
    var a = "//pubalifr.sojump.cn";
    if (b.indexOf("http://pubssl.sojump.com") == 0 || b.indexOf("https://pubssl.sojump.com") == 0 || b.indexOf("http://pubimage.sojump.com") == 0) {
        b = b.replace("http://pubssl.sojump.com", c).replace("https://pubssl.sojump.com", c).replace("http://pubimage.sojump.com", c);
    } else {
        if (b.indexOf("http://pubalifr.sojump.com") == 0 || b.indexOf("https://pubalifr.sojump.com") == 0 || b.indexOf("https://pubali.sojump.com") == 0 || b.indexOf("http://pubali.sojump.com") == 0) {
            b = b.replace("http://pubalifr.sojump.com", a).replace("https://pubalifr.sojump.com", a).replace("http://pubali.sojump.com", a).replace("https://pubali.sojump.com", a);
        }
    }*/
    return b;
}
function showHideFengMian(m) {
    var b = document.getElementById("slideChunk");
    var e = document.getElementById(divContentID);
    var q, a;
    if (m) {
        divFengMian.addEventListener("touchstart", function (v) {
            var w = v.touches[0];
            q = w.pageY;
            v.stopPropagation();
            v.preventDefault();
            return false;
        }, false);
        divFengMian.addEventListener("touchmove", function (v) {
            var w = v.touches[0];
            a = w.pageY;
            v.stopPropagation();
            v.preventDefault();
            return false;
        }, false);
        divFengMian.addEventListener("touchend", function (w) {
            var v = a - q;
            var x = v < 0 ? 1 : 0;
            if (x) {
                if (Math.abs(v) > 50) {
                    showHideFengMian(false);
                }
            }
            w.stopPropagation();
            w.preventDefault();
            return false;
        }, false);
        $(b).bind("click touchstart", function () {
            showHideFengMian(false);
        });
        var n = $("#fengMianTitle")[0];
        if (!n) {
            var d = $(divFengMian).css("background-image");
            var o = $(window).width();
            var r = $(window).height();
            if (window.debugLog) {
                debugLog("屏幕宽高：" + o + "px," + r + "px," + fmHeight + "px");
            }
            if (d) {
                var g = d.replace('url("', "").replace('")', "").replace("url(", "").replace(")", "");
                g = replaceSrcImg(g);
                var c = false;
                var u = document.createElement("img");
                $(divFengMian).css("background", "none");
                u.onload = function () {
                    var y = this.width;
                    var x = this.height;
                    var v = o / y * x;
                    if (v < fmHeight && v + 180 > fmHeight) {
                        c = true;
                    }
                    if (window.debugLog) {
                        debugLog("图片宽高：" + y + "px," + x + "px,需要拉长：" + c + "，新高度：" + v.toFixed(0) + "px");
                    }
                    var w = "";
                    if (c) {
                        w = "height:100%;";
                    }
                    $(divFengMian).prepend("<img src='" + g + "' style='width:100%;" + w + "' />");
                };
                u.src = g;
            }
            $(b).css("background", "rgba(0,0,0,.5)").height("62px").css("padding-top", "15px");
        }
        e.style.display = "none";
    } else {
        e.style.display = "";
        if (window.isChuangGuan == 2) {
            showContent(e);
        } else {
            var p = $(e).height();
            if (p < fmHeight) {
                e.style.height = fmHeight + "px";
            }
            $("html, body").animate({scrollTop: fmHeight + "px"}, 500, function () {
                showContent(e);
            });
        }
    }
    var j = $("body").hasClass("hasbgpic");
    var l = document.getElementById("toptitle");
    var s = l.getAttribute("nv");
    if (m) {
        $("#divBackgroundWrap").hide();
    } else {
        $("#divBackgroundWrap").show();
    }
    var k = document.getElementById("toplogo");
    var f = document.getElementById("divPowerBy");
    if (k) {
        k.style.display = m ? "none" : "";
    }
    if (divTip && (divTip.style.display != "none" || divTip.needShow)) {
        divTip.style.display = m ? "none" : "";
        divTip.needShow = true;
    }
    var i = document.getElementById("divLoadAnswer");
    if (i && (i.style.display != "none" || i.needShow)) {
        i.style.display = m ? "none" : "";
        i.needShow = true;
    }
    var t = document.getElementById("divTopHeader");
    if (t) {
        t.style.display = m ? "none" : "";
    }
    if (l && !s) {
        l.style.display = m ? "none" : "";
    }
    if (f) {
        f.style.display = m ? "none" : "";
    }
    if (j) {
        var h = m ? "0px" : "40px";
        $("body").css("padding-top", h);
    }
    if (window.hasPageTime && !m) {
        processMinMax();
    }
    if (!m && window.isChuangGuan == 2) {
        startChuangGuan(true);
    }
    if (window.initSlider) {
        initSlider();
    }
}
$(function () {
    showHideFengMian(true);
});